package com.mojian.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mojian.utils.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author: yuzhuo
 * @date: 2025/6/6
 * @description: 用户媒体平台关联表实体类
 */
@Data
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_user_platform")
@ApiModel(value = "用户媒体平台关联实体")
public class SysUserPlatform implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户ID（关联sys_user.id）")
    private Long userId;

    @ApiModelProperty(value = "平台类型：1.抖音；2.小红书；3.B站")
    private String platformType;

    @ApiModelProperty(value = "平台账号ID")
    private String platformId;

    @ApiModelProperty(value = "主页地址")
    private String homeUrl;

    @ApiModelProperty(value = "粉丝数")
    @TableField(fill = FieldFill.INSERT)
    private Integer fansCount;

    @ApiModelProperty(value = "内容数（作品/文章/视频）")
    @TableField(fill = FieldFill.INSERT)
    private Integer contentCount;

    @ApiModelProperty(value = "获赞数")
    @TableField(fill = FieldFill.INSERT)
    private Integer likeCount;

    @ApiModelProperty(value = "平均互动率(%)")
    @TableField(fill = FieldFill.INSERT)
    private BigDecimal avgEngagement;

    @ApiModelProperty(value = "是否认证：0-未认证 1-已认证")
    @TableField(fill = FieldFill.INSERT)
    private Integer isVerified;

    @ApiModelProperty(value = "认证类型（个人/企业/机构）")
    private String verificationType;

    @ApiModelProperty(value = "最后数据更新时间")
    private LocalDateTime lastUpdate;

    @ApiModelProperty(value = "平台等级（如：金V/银V）")
    private String platformLevel;

    @ApiModelProperty(value = "变现状态：0-未变现 1-已变现")
    @TableField(fill = FieldFill.INSERT)
    private Integer monetizationStatus;

    @ApiModelProperty(value = "是否接受广告合作")
    @TableField(fill = FieldFill.INSERT)
    private Integer adCooperation;

    @ApiModelProperty(value = "平台标签（逗号分隔）")
    private String platformTags;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = DateUtil.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = DateUtil.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "状态：0-失效 1-有效")
    @TableField(fill = FieldFill.INSERT)
    private Integer status;
} 